<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 数组

        var a=["英雄联盟","蜘蛛纸牌","扫雷"]
        // 下标     0         1        2 
                                 // a.length-1

        console.log(a.length-1)
        console.log(a[a.length-1])




        // console.log(a[1])
        // console.log(a)
        // for( var i in a){
        // 执行语句
        // }
        // for(var i in a){//下标值
        //    console.log(i)
        //    console.log(a[i])
        // }
            
    </script>
</body>
</html>